#include <stdio.h>
#include <math.h>

void fact(int num){
    double sum = 0;
    int comp = num;
    while (num!=0)
    {
        int t = num % 10;
        sum += pow(t, 3);
        num /= 10;
    }
    if(sum==comp)
        printf("%d\n",comp);
}

int main(int argc, char *argv[]) {

    for (size_t i = 100; i <= 999; i++)
    {
        fact(i);
    }
    
    return 0;
}